<template>
  <div class="header" id="header">
    <div class="container" style="text-align:left;">
      <span style="color:#fff;cursor: pointer;" id="focus_us" class="about_we">关注我们&nbsp;<img
        src="../assets/index/wechat.png" height="17" style="margin-left: 15px;">
      <div id="qrcode" style="position: absolute;z-index: 999;top: 40px;display: none">
        <img src="http://www.51aujia.com:8080/wechat/img/my/rb_2w.jpg" width="100" style="margin-top: -10px;-webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow: 0 5px 10px rgba(0,0,0,0.2);box-shadow: 0 5px 10px rgba(0,0,0,0.2); -webkit-background-clip: padding-box;-moz-background-clip: padding;">
      </div>
      </span>
      <router-link  :to="{name:'help'}" style="float:right;margin-left:27px;color:#fff">帮助中心</router-link>
      <span style="float:right;margin-left:27px;">|</span>
      <template v-if="_parentThis.loginStatus===0||_parentThis.loginStatus===0">
        <router-link style="float:right;margin-left:27px;color:#ffd594" id="login" :to="{name:'login'}">立即登录
        </router-link>
        <router-link style="float:right;color:#fff" id="register" :to="{name:'register'}">免费注册</router-link>
      </template>
      <template v-else>
        <router-link style="float:right;color:#fff" id="register" :to="{name:'login'}">退出</router-link>
        <router-link style="float:right;margin-right: 20px;color:#fff" id="persion" :to="{name:'asset'}">个人中心
        </router-link>
      </template>
      <router-link  :to="{name:'home'}" id="persion" style="float:right;color:#fff;margin-right: 23px;">首页</router-link>
      <a
        style="float:right;display:none;color:#fff" href="javascript:void(0);" id="exit" onclick="logout();">注销</a>
    </div>
  </div>
</template>
<script>
  export default{
    props: ['_parentThis'],
    mounted: function () {
      if (this.$cookie.get('id')) {
        this._parentThis.loginStatus = 1
      } else {
        this._parentThis.loginStatus = 0
      }
    }
  }
</script>
<style lang="scss">
  .header {
    background: #333;
    width: 100%;
    color: #fff;
    text-align: center;
    line-height: 28px;
  }
</style>
